package com.sq.partner.manager.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.FacadePrintConf;
import com.sq.partner.manager.mybatis.model.NlifeCon;
import com.sq.partner.manager.mybatis.model.NlifeCoreProd;
import com.sq.partner.manager.mybatis.model.NlifeCoreProdRisk;
import com.sq.partner.manager.mybatis.model.NlifeCov;
import com.sq.partner.manager.mybatis.model.NlifeProd;
import com.sq.partner.manager.mybatis.model.NlifeRation;
import com.sq.partner.manager.mybatis.model.NlifeRisk;
import com.sq.partner.manager.mybatis.model.TradProdProp;
import com.sq.partner.manager.util.Page;
import org.springframework.ui.ModelMap;

public interface INlifeProdConfigService {
	//-- new life prod begin
	public Page<NlifeProd> queryProdPageByCriteria(Page<NlifeProd> page) throws Exception;
	public NlifeProd queryProdInfoById(String param) throws Exception;
	public NlifeProd saveProd(NlifeProd prod) throws Exception;

    NlifeProd copyAddProd(NlifeProd prod) throws Exception;

    public NlifeProd updateProd(NlifeProd prod) throws Exception;
	public boolean updateSaleCode(Map<String, String> map) throws Exception;
	public boolean updateRiskMain(Map<String, String> map) throws Exception;
	public Page<NlifeCoreProd> queryNLifeCoreProd(Page<NlifeCoreProd> page) throws Exception;
	public List<NlifeProd> queryAllCoreProdInfoList() throws Exception;
	public boolean queryPrimaryRiskIsExist(String prodCode) throws Exception;
	public boolean queryPrimaryRiskIsExist1(String prodCode) throws Exception;
	public boolean isExistLinkPlanByProdCode(String prodCode) throws Exception;
	/**判断是多主险产品还是单主险*/
	public Integer queryRiskType(Map<String, String> map)throws SQLException;
	/**导出产品产品查询*/
	public List<Map<String, Object>> impNlifeProd(Map<String, Object>map) throws Exception;
	/**导出产品产品查询*/
	public List<Map<String, Object>> impNlifeProdRation(Map<String, Object>map) throws Exception;
	/**导出产品险种查询*/
	public List<Map<String, Object>> impNlifeRisk(Map<String, Object>map)throws SQLException;
 	/**导出产品责任查询*/
 	public List<Map<String, Object>>  impNlifeCov(Map<String, Object> map)throws SQLException;
 	/**导出产品保单配置查询*/
 	public  List<Map<String, Object>>  impNlifeProp(Map<String, Object> map)throws SQLException;
 	/**导出产品保单配置查询*/
 	public List<Map<String, Object>>  impNocarProp(Map<String, Object> map)throws SQLException;

 	/**导出产品回执配置查询*/
 	public  List<Map<String, Object>>  impNlifePrint(Map<String, Object> map)throws SQLException;
	public Integer queryPrimaryRiskIsExist3(String prodCode) throws Exception;
	public boolean deleteProd(String prodCode) throws Exception;
	public boolean queryPrimaryRiskIsExist2(Map<String, String>map) throws Exception;
	//-- new life prod end
	
	//-- new life risk begin
	public Page<NlifeRisk> queryRiskPageByCriteria(Page<NlifeRisk> page,String prodCode) throws Exception;
	public Page<NlifeCoreProdRisk> queryCoreProdRiskTempletPageById(Page<NlifeCoreProdRisk> page, String coreProdCode, String prodCode, String riskCode, String riskName) throws Exception;
	public boolean queryIsExistRiskPrimaryKeyByParams(NlifeRisk risk) throws Exception;
	public boolean saveRisk(NlifeRisk risk) throws Exception;
	public boolean updateRisk(NlifeRisk risk) throws Exception;
	public boolean deleteRisk(NlifeRisk risk) throws Exception;
	public boolean updateMRisk(String prodCode,String tradRiskCode,Integer flag,String rationId) throws Exception ;
 	public boolean deleteRiskInfoByProdCode(String prodCode) throws Exception;
	//-- new life risk end
	
	//-- new life cov begin
	public Page<NlifeCov> queryCovPageByCriteria(Page<NlifeCov> page) throws Exception;
	public Page<NlifeCov> queryCovPageByCriteria1(Page<NlifeCov> page) throws Exception;
	public boolean saveCov(NlifeCov cov) throws Exception;
 	public boolean deleteCov(NlifeCov cov) throws Exception;
 	public boolean deleteCovInfoByProdCode(String prodCode) throws Exception;
	public List<NlifeCov> queryItemsAndCovsInfoByPolicyId(String policyId) throws Exception;
	//-- new life cov end
	
	//-- new life con begin
	public Page<NlifeCon> queryConPageByCriteria(Page<NlifeCon> page,String prodCode) throws Exception;
	public boolean saveProdConInsure(NlifeCon nc) throws Exception;
	public boolean deleteProdConInsureByProdCode(String prodCode) throws Exception;
	public boolean searchProdConInsureInfoByProdCode(String prodCode) throws Exception;
	//-- new life con end
	
	public List<NlifeRation> queryRiskAndRationByParam(Map<String,Object> map)throws Exception;
	
	public boolean queryNlifeRiskIsExits(NlifeRisk risk)throws Exception;
	
	public boolean deleteRationByProdCode(NlifeRation ration)throws Exception;
	
	public boolean deleteAllRationByProdCode(String prodCode)throws Exception;
	
	void toCopyAddNlifeProduct(ModelMap modelMap, String prodCode) throws Exception;
	
	void importAllProdInfo(String sql) throws Exception;
}
